package com.zzyl.controller;

import com.zzyl.base.ResponseResult;
import com.zzyl.dto.NursingProjectPlanDto;
import com.zzyl.service.NursingProjectPlanService;
import com.zzyl.vo.NursingProjectPlanVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/nursing/plan")
@Api(tags = "护理项目相关接口")
public class NursingProjectPlanController extends BaseController{
//    @Autowired
//    private NursingProjectPlanService nursingProjectPlanService;
//
//
//    /**
//     根据id查询护理计划
//     */
//    @GetMapping("/{id}")
//    @ApiOperation(value = "根据id查询护理计划")
//    public ResponseResult<NursingProjectPlanVo> getNursingPlanById(@PathVariable("id") Integer id){
//        NursingProjectPlanVo nursingProjectPlanVo =nursingProjectPlanService.getNursingPlanById(id);
//        return success(nursingProjectPlanVo);
//    }
//
//    /**
//      修改护理计划
//     */
//    @PutMapping("/{id}")
//    @ApiOperation(value = "修改护理计划")
//    public ResponseResult updateNursingPlan(
//            @PathVariable("id") Integer id,
//            @RequestBody NursingProjectPlanDto nursingProjectPlanDto){
//        nursingProjectPlanService.updateNursingPlan(id,nursingProjectPlanDto);
//        return success();
//    }
//
//    /**
//     删除护理计划
//     */
//    @DeleteMapping("/{id}")
//    @ApiOperation("根据id删除护理计划")
//    public ResponseResult deleteNursingPlan(@PathVariable("id") Integer id){
//        nursingProjectPlanService.deleteNursingPlan(id);
//        return success();
//    }
//    /**
//     启用或禁用
//     */
//    @PutMapping("/{id}/status/{status}")
//    @ApiOperation("启用或禁用")
//    public ResponseResult enableOrDisable(
//            @PathVariable("id") Integer id,//传入的ID是护理等级的ID
//            @PathVariable("id") Integer status
//            ){
//        logger.info("启用或禁用,请求参数：{},{}",id,status);
//
//        boolean result = nursingProjectPlanService.enableOrDisable(id, status);
//
//        if (result) {
//            return success("状态更改成功");
//        } else {
//            return error("状态更改失败，护理计划不存在或状态无效");
//        }
//    }

}
